Data Structure
Q31.
Consider a B+-tree in which the maximum number of keys in a node is 5. What is the minimum number of keys in any non-root node?Q32.
The following key values are inserted into a B+ tree in which order of the internal nodes is 3, and that of the leaf nodes is 2, in the sequence given below. The order of internal nodes is the maximum number of tree pointers in each node, and the order of leaf nodes is the maximum number of data items that can be stored in it. The B+ - tree is initially empty. 10, 3, 6, 8, 4, 2, 1 The maximum number of times leaf nodes would get split up as a result of these insertions isQ34.
Consider the B^{+} tree in the adjoining figure, where each node has at most two keys and three links. Now the key K50 is deleted from the B^{+} tree resulting after the two insertions made earlier. Consider the following statements about the B^{+} tree resulting after this deletion. i.The height of the tree remains the same. ii.The node (disregarding the links) is present in the tree. iii.The root node remains unchanged (disregarding the links)1 Which one of the following options is true ?Q35.
Consider the B^+ tree in the adjoining figure, where each node has at most two keys and three links.Keys K15 and then K25 are inserted into this tree in that order. Exactly how many of the following nodes (disregarding the links) will be present in the tree after the two insertions?Q36.
Suppose a binary search tree with 1000 distinct elements is also a complete binary tree. The tree is stored using the array representation of binary heap trees. Assuming that the array indices start with 0, the 3rd largest element of the tree is stored at index _______.Q37.
A binary search tree T contains n distinct elements. What is the time complexity of picking an element in T that is smaller than the maximum element in T?Q39.
The preorder traversal of a binary search tree is 15,10,12,11,20,18,16,19. Which one of the following is the postorder traversal of the tree?Q40.
The pre-order transversal of a binary search tree is given by 12, 8, 6, 2, 7, 9, 10, 16, 15, 19, 17, 20. Then the post-order traversal of this tree is: